<!DOCTYPE html>
<html lang="zh-CN">
@include('admin.head')
<style>
    th{
        text-align: center;
    }
    tr{
        text-align: center;
    }
</style>
<body>

@include('admin.topNav')

<div class="container-fluid">
    <div class="row">
        @include('admin.leftNav')
        <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
            @if(session('__Ajax_RedirectFunc_status') == true)
                <div>
                    <div class="alert alert-success alert-dismissible fade in" role="alert">
                        <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                            <span aria-hidden="true">&times;</span>
                        </button>
                        <h3>成功</h3>
                        <p><?php echo session('__Ajax_RedirectFunc_message');?></p>
                        <p><?php echo session('__Ajax_RedirectFunc_plugin');?></p>
                    </div>
                </div>
            @endif
            @if(session('__Ajax_RedirectFunc_status') === false)
                <div >
                    <div class="alert alert-danger alert-dismissible fade in" role="alert">
                        <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                            <span aria-hidden="true">&times;</span>
                        </button>
                        <h3>失败</h3>
                        <p><?php echo session('__Ajax_RedirectFunc_message');?></p>
                        <p><?php echo session('__Ajax_RedirectFunc_plugin');?></p>
                    </div>
                </div>
            @endif
            <h2 class="page-header">已取走的订单</h2>

            <div class="panel-body" >

                <table class="table table-responsive table-condensed table-hover table-striped">
                    <thead>
                    <tr>
                        <th>订单时间</th>
                        <th>订单编号</th>
                        <th>订单类型</th>
                        <th>单价</th>
                        <th>数量</th>
                        <th>客户</th>
                        <th>联系方式</th>
                        <th>备注</th>
                        <th>应收金额</th>
                    </tr>
                    </thead>
                    <tbody>
                    @foreach($taskData as $data)
                        <tr>
                            <td>{{$data->task_time}}</td>
                            <td>
                                <?php
                                $ids = DB::table('accessory')->where('accessory_id',$data->task_id)->first();
                                echo substr($ids->accessory_address,'0','18');
                                ?>
                            </td>
                            <td>{{$data->service_name}}</td>
                            <td>{{$data->service_price}} 元 / 张</td>
                            <td>{{$data->task_num}} 张</td>
                            <td>{{$data->user_name}}</td>
                            <td>{{$data->user_phone}}</td>
                            <td>{{$data->task_info}}</td>
                            <td>{{$data->task_price}}元</td>
                        </tr>
                    @endforeach
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>
</body>
</html>